/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.projecao.spe.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Desenvolvimento
 */
@Embeddable
public class CronogramaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idcronograma")
    private int idcronograma;
    @Basic(optional = false)
    @Column(name = "idplano_ensino")
    private int idplanoEnsino;

    public CronogramaPK() {
    }

    public CronogramaPK(int idcronograma, int idplanoEnsino) {
        this.idcronograma = idcronograma;
        this.idplanoEnsino = idplanoEnsino;
    }

    public int getIdcronograma() {
        return idcronograma;
    }

    public void setIdcronograma(int idcronograma) {
        this.idcronograma = idcronograma;
    }

    public int getIdplanoEnsino() {
        return idplanoEnsino;
    }

    public void setIdplanoEnsino(int idplanoEnsino) {
        this.idplanoEnsino = idplanoEnsino;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idcronograma;
        hash += (int) idplanoEnsino;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CronogramaPK)) {
            return false;
        }
        CronogramaPK other = (CronogramaPK) object;
        if (this.idcronograma != other.idcronograma) {
            return false;
        }
        if (this.idplanoEnsino != other.idplanoEnsino) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.projecao.spe.modelo.CronogramaPK[idcronograma=" + idcronograma + ", idplanoEnsino=" + idplanoEnsino + "]";
    }

}
